#define ElemType int

typedef struct ListNode List_Node;

#include "common.h"

int numberOfArithmeticSlices(int* nums, int numsSize);

int main()
{
	return 0;
}

int numberOfArithmeticSlices(int* nums, int numsSize)
{
	if (numsSize < 3) return 0;

	int diff = nums[1] - nums[0], amount = 0, res = 0;
	for (int i = 2; i < numsSize; i++) {
		if (nums[i] - nums[i - 1] == diff)
			amount++;
		else {
			diff = nums[i] - nums[i - 1];
			amount = 0;
		}
		res += amount;
	}
	return res;
}
